<?php
/*
  报名参加训练的人员列表。
 */
$contents = array();
if (isset($eventId) && $eventId > 0) {

    $eventTable = new BAEventSheet();
    $event = $eventTable->getListById($eventId);
    $trainTable = new BAEventSheet($event);  
    if (isset($contentId) && $contentId > 0) {
         $train = $trainTable->getListById($contentId);
        $trainRegisterTable = new BAEventSheet($train);
        $contents = $trainRegisterTable->getView();      
    }

}
    
?>
<script type="text/javascript">
    $(document).ready(function() {
        $("#selectAll").click(function() {
            if ($(this).attr("checked") == "checked") {
                $(":checkbox").attr("checked", true);
            } else {
                $(":checkbox").attr("checked", false);
            }
        });

    });
</script> 
<legend>
    <h4>
<?php echo $control->getAjaxLink(array('name' => '活动列表', 'id' => 'showManage')); ?>\  
<?php echo $control->getAjaxLink(array('name' => '训练列表', 'id' => 'showTtrainList'),array('eventId' => $eventId, 'contentId' => $contentId, 'manageView' => $manageView)); ?>\
        <?php echo '已报名人员'; ?>
    </h4>
</legend>
<table class="table table-hover">
    <thead>
        <tr>
            
            <th>姓名</th>
            <th>性别</th>
            <th>身份证号码 </th>
            <th>联系方式</th>
        </tr> 
    </thead>
    <tbody>
<?php
        if (isset($contents)){
        foreach ($contents as $content) {
        if($content->getListNode()->status != 1)
        {
            
    $contentId = $content->getId();
    $perName = $content->getItem('perName')->getValue();
    $sex = $content->getItem('sex')->getValue();
    $IDNum = $content->getItem('IDNumber')->getValue();
    $phoneNum = $content->getItem('phoneNumber')->getValue();
    
    ?>
            <tr>
                
                <td> <?php echo $perName; ?> </td>
                <td> <?php echo $sex; ?></td>
                <td> <?php echo $IDNum; ?></td>
                <td> <?php echo $phoneNum; ?></td>
                <td>
                    
                    <div class="row-fluid">
                    </div>                   
                </td>
            </tr>
    <?php
        }}
       }
 else {
    echo '暂无报名';
 }
?>
    </tbody>
</table>